//
//  LSPublicNoticeVController.m
//  LookScore
//
//  Created by wr on 2017/12/8.
//  Copyright © 2017年 ChongQingXunTiCompany. All rights reserved.
//

#import "LSPublicNoticeVController.h"
#import "LSPublicNoticeCell.h"
@interface LSPublicNoticeVController ()<UITableViewDelegate,UITableViewDataSource>

@property(strong,nonatomic)UITableView *tableView;

@property(strong,nonatomic)NSMutableArray *modelArray;

@end

@implementation LSPublicNoticeVController

-(UITableView *)tableView{
    if (!_tableView) {
        _tableView = [[UITableView alloc]init];
        _tableView.delegate = self;
        _tableView.dataSource = self;
        _tableView.backgroundColor =LSBackGroundColor;
        _tableView.showsVerticalScrollIndicator = NO;
        _tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
    }
    return _tableView;
}


- (void)viewDidLoad {
    [super viewDidLoad];
    self.title=@"公告";
    self.modelArray=[[NSMutableArray alloc]init];
    [self.view addSubview:self.tableView];
   
    self.tableView.estimatedRowHeight=110;
    self.tableView.rowHeight=110; self.tableView.sd_layout.leftEqualToView(self.view).topEqualToView(self.view).rightEqualToView(self.view).bottomEqualToView(self.view);
  
}

#pragma mark 🔥 tableViewDelegate tableViewDataSource


-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    
   
    
    return self.modelArray.count;
    
}


- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    
    return tableView.rowHeight;
}
-(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{
    
    UIView *backView=[[UIView alloc]initWithFrame:CGRectMake(0, 0, self.tableView.width,60)];
    UILabel *label=[[UILabel alloc]init];
    label.font=LSFontSize11;
    label.text=@"---";
    label.textColor=LSTitleGrayColor2;
    [backView addSubview:label];
    label.sd_layout.leftEqualToView(backView).topEqualToView(backView).offset(40).rightEqualToView(backView).heightIs(20);
    
    
 
    return backView;
    
}
-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
 
    return 60;
}
- (UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
//   panduan类型
    
    
    LSPublicNoticeCell *cell=[LSPublicNoticeCell PublicNoticeTableViewCellByTableView:tableView];

//    LSPublicNoticeEasyCell *cell=[LSPublicNoticeEasyCell PublicNoticeEasyTableViewCellByTableView:tableView];
    
    return cell;
}
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
    
    
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
